#ifndef DATE_H
#define DATE_H

#include <ctime>
#include <iostream>
#include <iomanip>
#include <string>
#include <map>
using namespace std;

class Date {
public:

    Date ();
    Date (int, int); // yday, year
    Date (int, int, int); // day, month, year
    Date (string, int, int); // month, day, year
    virtual ~Date ();

    Date & setDay (int);
    Date & setMonth (int);
    Date & setYear (int);
    Date & setDate (int, int, int);

    int getDay () const;
    int getMonth () const;
    int getYear () const;
    int getDayOfYear () const;
    const char * getMonthName () const;

    void print () const;
    void printDDDYYYY () const;
    void printMMDDYY () const;
    void pirntMonthDDYYYY () const;

private:
    int _month, _day, _year;
    static const char * _weeks[7];
    static const char * _months[12];
    static const int _days_per_month[12];

    static bool is_leap_year (int);
};

#endif
